package com.design.movieticket.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.design.movieticket.entity.MovieHall;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface MovieHallMapper extends BaseMapper<MovieHall> {
    /** 通过影院id获取影厅列表数据 */
    @Select("select * from movie_hall where cinema_id = #{cinemaId} and del_flag = 0")
    List<MovieHall> getMovieHallListByCinemaId(long cinemaId);

    /** 更改影厅状态 */
    @Update("update movie_hall set status = #{status} where id = #{id}")
    public void changeMovieHallStatus(long id, int status);
}
